<?php
$dirList = explode('/', $_SERVER['PHP_SELF']);
require $_SERVER ["DOCUMENT_ROOT"] . "/$dirList[1]/conf/conf.php";
$httpUrl = "http://127.0.0.1/$dirList[1]/act/action.php";
// 请求参数
//1.测试通讯
$test_action = array(
		"ACTION_TYPE" => AT_TEST,
);
//发送数据
$post_data = json_encode ( $test_action );
$ch = curl_init ();
curl_setopt ( $ch, CURLOPT_URL, $httpUrl );
curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
// post传参
curl_setopt ( $ch, CURLOPT_POST, 1 );
curl_setopt ( $ch, CURLOPT_POSTFIELDS, $post_data );
$result = curl_exec ( $ch );
curl_close ( $ch );
// 解析结果
echo $result;
?>